Skip to content

Add ACM Submariner pre-pair validation - #4

Open
TimothyAsirJeyasing wants to merge 2 commits into
rh-8574-mirrorpeer-pre-pair-validation-redesignfrom
rh-8574-pr2-acm-submariner-validation
Open

Add ACM Submariner pre-pair validation#4
TimothyAsirJeyasing wants to merge 2 commits into
rh-8574-mirrorpeer-pre-pair-validation-redesignfrom
rh-8574-pr2-acm-submariner-validation

Conversation

@TimothyAsirJeyasing

Copy link
Copy Markdown
Owner

Summary

This PR adds ACM-managed Submariner pre-pair validation to the Create DRPolicy wizard.

During the Configure step, the selected cluster pair is validated using the ACM ManagedClusterAddOn resource. Users can continue only when the selected pair is ready for pairing.

The validation logic is kept separate from the UI:

  • the hook watches ACM resources,
  • the utility evaluates the cluster pair,
  • the UI presents the validation result.

Out of scope

This PR covers ACM-managed Submariner validation only.

Validation for upstream Submariner deployments (using ManagedClusterView and Submariner Broker/Cluster resources) will be added in a follow-up PR.

Introduce the four-step PatternFly wizard (Clusters, Configure, Policy,
Review) without Submariner or Globalnet pre-pair validation yet.
@TimothyAsirJeyasing
TimothyAsirJeyasing force-pushed the rh-8574-mirrorpeer-pre-pair-validation-redesign branch from 10ee53c to 12e8396 Compare July 22, 2026 13:10
Watch ManagedClusterAddOn health for the selected cluster pair, gate the
Configure step on canProceed, and keep evaluation in mco utils/hooks.

How Submariner is checked (ACM path):
- Hub watch only: ManagedClusterAddOn named "submariner" per managed
  cluster namespace (RHACM Networking docs). No ManagedClusterView in
  this PR; spoke Broker/Cluster CRs are for upstream/Globalnet later.
- NotInstalled: addon object missing (usual) or watch 404 (absent API
  resource) — not a condition on the MCA spec. Both missing => skip
  validation and allow Next (UX: Cluster network - Skipped).
- Per cluster after addon exists: Available first
  (SubmarinerAgentAvailable=True); then connected
  (SubmarinerConnectionDegraded=False) => Healthy. ConnectionDegraded,
  AgentDegraded, RouteAgentConnectionDegraded, or unlabeled gateway =>
  Degraded. Available not ready / connection unset => Progressing.
- Pair gate: both NotInstalled or both Healthy => canProceed; one-sided
  install => Inconsistent (block); otherwise Degraded/Progressing block.

Why this combination (vs connectivity-only):
- Available then ConnectionDegraded matches ACM's documented MCA
  conditions for deploy + established connections. Extra degraded
  signals (agent/route/gateway) fail closed so we do not treat a
  half-ready addon as connected. Can narrow the gate later if product
  wants ConnectionDegraded alone.

Out of scope here: Globalnet/CIDR overlap warnings, MCV lifecycle.
@TimothyAsirJeyasing
TimothyAsirJeyasing force-pushed the rh-8574-pr2-acm-submariner-validation branch from 794f95c to 2bcfe01 Compare July 22, 2026 13:30
@TimothyAsirJeyasing
TimothyAsirJeyasing force-pushed the rh-8574-mirrorpeer-pre-pair-validation-redesign branch 5 times, most recently from bcfbbc9 to c892b60 Compare July 28, 2026 09:28
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant